home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.1 / Amiga Developer CD v1.1 - May 1996 (1996)(Schatztruhe)[!].iso / Contributions / IAM / Networking / Envoy-2.0 / doc / accounts.doc next >
Text File  |  1994-12-22  |  11KB  |  418 lines

  1. TABLE OF CONTENTS
  2.  
  3. accounts.library/AllocGroupInfo
  4. accounts.library/AllocUserInfo
  5. accounts.library/FreeGroupInfo
  6. accounts.library/FreeUserInfo
  7. accounts.library/IDToGroup
  8. accounts.library/IDToUser
  9. accounts.library/MemberOf
  10. accounts.library/NameToGroup
  11. accounts.library/NameToUser
  12. accounts.library/NextGroup
  13. accounts.library/NextMember
  14. accounts.library/NextUser
  15. accounts.library/VerifyUser
  16. accounts.library/IDToUser
  17. accounts.library/AllocGroupInfo               accounts.library/AllocGroupInfo
  18.  
  19.    NAME
  20.     AllocGroupInfo -- Allocate a GroupInfo structure.
  21.  
  22.    SYNOPSIS
  23.     groupinfo = AllocGroupInfo()
  24.     D0
  25.  
  26.        struct GroupInfo *AllocGroupInfo(void);
  27.  
  28.    FUNCTION
  29.     Allocates a structure for holding group information.  You *must*
  30.     use this function for allocating a GroupInfo structure, or you
  31.     risk not being compatible with future versions of
  32.     accounts.library.
  33.  
  34.    INPUTS
  35.     None
  36.  
  37.    RESULT
  38.     groupinfo - A pointer to a freshly allocated GroupInfo structure, or
  39.         NULL of not enough memory was available.
  40.  
  41.    NOTES
  42.     GroupInfo structures must be free with a call to FreeGroupInfo().
  43.  
  44.    SEE ALSO
  45.     FreeGroupInfo()
  46.  
  47. accounts.library/AllocUserInfo                 accounts.library/AllocUserInfo
  48.  
  49.    NAME
  50.     AllocUserInfo -- Allocate a UserInfo structure.
  51.  
  52.    SYNOPSIS
  53.     userinfo = AllocUserInfo()
  54.     D0
  55.  
  56.        struct UserInfo *AllocUserInfo(void);
  57.  
  58.    FUNCTION
  59.     Allocates a structure for holding user information.  You *must*
  60.     use this function for allocating a UserInfo structure, or you
  61.     risk not being compatible with future versions of
  62.     accounts.library.
  63.  
  64.    INPUTS
  65.     None
  66.  
  67.    RESULT
  68.     userinfo - A pointer to a freshly allocated UserInfo structure, or
  69.         NULL of not enough memory was available.
  70.  
  71.    NOTES
  72.     UserInfo structures must be free with a call to FreeUserInfo().
  73.  
  74.    SEE ALSO
  75.     FreeUserInfo()
  76.  
  77. accounts.library/FreeGroupInfo                 accounts.library/FreeGroupInfo
  78.  
  79.    NAME
  80.     FreeGroupInfo -- Free a GroupInfo structure.
  81.  
  82.    SYNOPSIS
  83.     FreeGroupInfo(groupinfo)
  84.              A0
  85.  
  86.     VOID FreeGroupInfo (struct GroupInfo *);
  87.  
  88.    FUNCTION
  89.     Frees a GroupInfo structure that was allocated with AllocGroupInfo().
  90.  
  91.    INPUTS
  92.     groupinfo - pointer to the GroupInfo strcture that you want to free.
  93.  
  94.    RESULT
  95.     None
  96.  
  97.    NOTES
  98.     *Never* use this function to free a GroupInfo structure that wasn't
  99.     allocated with AllocGroupInfo().
  100.  
  101.    SEE ALSO
  102.     AllocGroupInfo()
  103.  
  104. accounts.library/FreeUserInfo                   accounts.library/FreeUserInfo
  105.  
  106.    NAME
  107.     FreeUserInfo -- Free a UserInfo structure.
  108.  
  109.    SYNOPSIS
  110.     FreeUserInfo(userinfo)
  111.              A0
  112.  
  113.     VOID FreeUserInfo (struct UserInfo *);
  114.  
  115.    FUNCTION
  116.     Frees a UserInfo structure that was allocated with AllocUserInfo().
  117.  
  118.    INPUTS
  119.     userinfo - pointer to the UserInfo strcture that you want to free.
  120.  
  121.    RESULT
  122.     None
  123.  
  124.    NOTES
  125.     *Never* use this function to free a UserInfo structure that wasn't
  126.     allocated with AllocUserInfo().
  127.  
  128.    SEE ALSO
  129.     AllocUserInfo()
  130.  
  131. accounts.library/IDToGroup                         accounts.library/IDToGroup
  132.  
  133.    NAME
  134.     IDToGroup - Find a group by GID
  135.  
  136.    SYNOPSIS
  137.        error = IDToGroup(groupid, groupinfo)
  138.     D0         D0     A0
  139.  
  140.        ULONG IDToGroup(UWORD, struct GroupInfo *)
  141.  
  142.    FUNCTION
  143.     This function will try to find a group by his/her UID.  If
  144.     successfuly, the GroupInfo will be filled in with the group's
  145.     name and GID.
  146.  
  147.    INPUTS
  148.     groupid - the 16-bit groupid if the group you are looking for.
  149.     groupinfo - Pointer to a GroupInfo structure to fill in.
  150.  
  151.    RESULTS
  152.     Returns 0 if the group is a member of the group, or an error.
  153.     Please see <envoy/errors.h> for possible error codes.
  154.  
  155.    SEE ALSO
  156.  
  157. accounts.library/IDToUser                           accounts.library/IDToUser
  158.  
  159.    NAME
  160.     IDToUser - Find a user by UID
  161.  
  162.    SYNOPSIS
  163.        error = IDToUser(userid, userinfo)
  164.     D0         D0     A0
  165.  
  166.        ULONG IDToUser(UWORD, struct UserInfo *)
  167.  
  168.    FUNCTION
  169.     This function will try to find a user by his/her UID.  If
  170.     successfuly, the UserInfo will be filled in with the user's
  171.     name, UID, primary GID and flags.
  172.  
  173.    INPUTS
  174.     userid - the 16-bit userid if the user you are looking for.
  175.     userinfo - Pointer to a UserInfo structure to fill in.
  176.  
  177.    RESULTS
  178.     Returns 0 if the user is a member of the group, or an error.
  179.     Please see <envoy/errors.h> for possible error codes.
  180.  
  181.    SEE ALSO
  182.  
  183. accounts.library/MemberOf                           accounts.library/MemberOf
  184.  
  185.    NAME
  186.     MemberOf -- Verify a user's group membership.
  187.  
  188.    SYNOPSIS
  189.     error = MemberOf(group, user)
  190.     D0         A0     A1
  191.  
  192.     ULONG MemberOf(struct GroupInfo *, struct UserInfo *)
  193.  
  194.    FUNCTION
  195.     This function will consult the users and groups database to see
  196.     if the given user is a member of the given group.
  197.  
  198.    INPUTS
  199.     group - Pointer to a GroupInfo that is filled in with the name
  200.         of the group or the group's GID.
  201.     user - Pointer to a UserInfo that is filled in with the name of
  202.         the user or the user's UID.
  203.  
  204.    RESULTS
  205.     Returns 0 if the user is a member of the group, or an error.
  206.     Please see <envoy/errors.h> for possible error codes.
  207.  
  208.    SEE ALSO
  209.  
  210. accounts.library/NameToGroup                     accounts.library/NameToGroup
  211.  
  212.    NAME
  213.     NameToGroup -- Find a group by name.
  214.  
  215.    SYNOPSIS
  216.     error = NameToGroup(groupName, groupinfo)
  217.     D0            A0           A1
  218.  
  219.     ULONG NameToGroup(STRPTR, struct GroupInfo *)
  220.  
  221.    FUNCTION
  222.     This function will try to find a named group in the groups
  223.     database and then fill in the GroupInfo structure with the
  224.     group's name and GID.
  225.  
  226.    INPUTS
  227.     groupName - The name of the group you want information fo.
  228.     groupinfo - A GroupInfo structure to be filled in.
  229.  
  230.    RESULTS
  231.     Returns 0 if the user is a member of the group, or an error.
  232.     Please see <envoy/errors.h> for possible error codes.
  233.  
  234.    SEE ALSO
  235.  
  236. accounts.library/NameToUser                       accounts.library/NameToUser
  237.  
  238.    NAME
  239.     NameToUser -- Find a user by name.
  240.  
  241.    SYNOPSIS
  242.     error = NameToUser(userName, userinfo)
  243.     D0           A0         A1
  244.  
  245.     ULONG NameToUser(STRPTR username, struct UserInfo *)
  246.  
  247.    FUNCTION
  248.     This function will try to find a user given a user's name. If the
  249.     user exists in the users database, the UserInfo struct will be
  250.     filled in with the user's name, UID, primary GID, and flags.
  251.  
  252.    INPUTS
  253.     userName - The name of the user you want information for.
  254.     userinfo - A UserInfo structure to be filled in.
  255.  
  256.    RESULTS
  257.     Returns 0 if the user is a member of the group, or an error.
  258.     Please see <envoy/errors.h> for possible error codes.
  259.  
  260.    SEE ALSO
  261.  
  262. accounts.library/NextGroup                         accounts.library/NextGroup
  263.  
  264.    NAME
  265.     NextGroup - Scan through the group database.
  266.  
  267.    SYNOPSIS
  268.     error = NextGroup(groupinfo)
  269.     D0          A0
  270.  
  271.     ULONG NextGroup(struct GroupInfo *)
  272.  
  273.    FUNCTION
  274.     This function is used for building a list of all groups on the
  275.     system.  The first time you call NextGroup, the ui_GroupID of the
  276.     GroupInfo structure should be filled in with 0.
  277.  
  278.     Each call to NextGroup() will fill in the GroupInfo structure with
  279.     the next group in the database.  When all group's have been listed,
  280.     NextGroup() will return with ENVOYERR_LASTGROUP.
  281.  
  282.    INPUTS
  283.     groupinfo - Pointer to a GroupInfo structure to fill in with the
  284.        next Group in the database.
  285.  
  286.    RESULTS
  287.     Returns 0 until the last group is filled in, and then returns
  288.     ENVOYERR_LASTGROUP.  You *must* check for other possible error
  289.     conditions as well.
  290.  
  291.    SEE ALSO
  292.     NextUser(), NextMember()
  293.  
  294. accounts.library/NextMember                       accounts.library/NextMember
  295.  
  296.    NAME
  297.     NextMember - Scan through the a group's member list.
  298.  
  299.    SYNOPSIS
  300.     error = NextMember(groupinfo, userinfo)
  301.     D0          A0         A1
  302.  
  303.     ULONG NextMember(struct GroupInfo *, struct UserInfo *)
  304.  
  305.    FUNCTION
  306.     This function is used for building a list of all members in a
  307.     group.  The first time you call NextMember, the ui_UserID of the
  308.     UserInfo structure should be filled in with 0.  The GroupInfo
  309.     structure should contain either the GID or the name of the group
  310.     that you want to scan.  If both are given, the GID will have
  311.     priority.
  312.  
  313.     Each call to NextMember() will fill in the UserInfo structure with
  314.     the next user in the group.  When all users's have been listed,
  315.     NextMember() will return with ENVOYERR_LASTMEMBER.
  316.  
  317.    INPUTS
  318.     groupinfo - Pointer to a GroupInfo structure that is filled in
  319.         for the group you want to scan.
  320.     userinfo - Pointer to a UserInfo structure to fill in with the
  321.         next member of the group.
  322.  
  323.    RESULTS
  324.     Returns 0 until the last group is filled in, and then returns
  325.     ENVOYERR_LASTMEMBER.  You *must* check for other possible error
  326.     conditions as well.
  327.  
  328.    SEE ALSO
  329.     NextUser(), NextGroup()
  330.  
  331. accounts.library/NextUser                           accounts.library/NextUser
  332.  
  333.    NAME
  334.     NextUser - Scan through the user database.
  335.  
  336.    SYNOPSIS
  337.     error = NextUser(userinfo)
  338.     D0         A0
  339.  
  340.     ULONG NextUser(struct UserInfo *)
  341.  
  342.    FUNCTION
  343.     This function is used for building a list of all user's on the
  344.     system.  The first time you call NextUser, the ui_UserID of the
  345.     UserInfo structure should be filled in with 0.
  346.  
  347.     Each call to NextUser() will fill in the UserInfo structure with
  348.     the next user in the database.  When all user's have been listed,
  349.     NextUser() will return with ENVOYERR_LASTUSER.
  350.  
  351.    INPUTS
  352.     userinfo - Pointer to a UserInfo structure to fill in with the
  353.        next User in the database.
  354.  
  355.    RESULTS
  356.     Returns 0 until the last user is filled in, and then returns
  357.     ENVOYERR_LASTUSER.  You *must* check for other possible error
  358.     conditions as well.
  359.  
  360.    SEE ALSO
  361.     NextGroup(), NextMember()
  362.  
  363. accounts.library/VerifyUser                       accounts.library/VerifyUser
  364.  
  365.    NAME
  366.     VerifyUser -- Verify a user's name and password.
  367.  
  368.    SYNOPSIS
  369.     error = VerifyUser(username, password, userinfo)
  370.     D0           A0         A1           A2
  371.  
  372.     ULONG VerifyUser(STRPTR, STRPTR, struct UserInfo *)
  373.  
  374.    FUNCTION
  375.     This function will consult the Users database and check to see
  376.     if the username and password given are vaild.  If they are,
  377.     accounts.library will fill in the UserInfo structure with the
  378.     user's UID, primary GID, and the flags set for that user.
  379.  
  380.    INPUTS
  381.     username - pointer to a user name.
  382.     password - pointer to a user's password.
  383.     userinfo - pointer to a struct UserInfo.
  384.  
  385.    RESULTS
  386.     VerifyUser() will return 0 if the user and password were vaild.
  387.     Otherwise, an error code will be returned.  Please see
  388.     <envoy/errors.h> for possible error codes.
  389.  
  390.    SEE ALSO
  391.  
  392. accounts.library/IDToUser                           accounts.library/IDToUser
  393.  
  394.    NAME
  395.     IDToUser - Find a user by UID
  396.  
  397.    SYNOPSIS
  398.        error = IDToUser(userid, userinfo)
  399.     D0         D0     A0
  400.  
  401.        ULONG IDToUser(UWORD, struct UserInfo *)
  402.  
  403.    FUNCTION
  404.     This function will try to find a user by his/her UID.  If
  405.     successfuly, the UserInfo will be filled in with the user's
  406.     name, UID, primary GID and flags.
  407.  
  408.    INPUTS
  409.     userid - the 16-bit userid if the user you are looking for.
  410.     userinfo - Pointer to a UserInfo structure to fill in.
  411.  
  412.    RESULTS
  413.     Returns 0 if the user is a member of the group, or an error.
  414.     Please see <envoy/errors.h> for possible error codes.
  415.  
  416.    SEE ALSO
  417.  
  418.